﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data;

using System.Web.Security;

using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Web.UI.DataVisualization.Charting;
using System.Drawing;

 

namespace HZ.Supervise.Web.Secondphase.ShowImage.test
{
    public partial class 双柱状图 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            // Populate chart with random data
            Random random = new Random();
            double xValue = 2;
            for (int pointIndex = 0; pointIndex < 20; pointIndex++)
            {
                Chart1.Series["Series Input"].Points.AddXY(xValue, random.Next(2, 47));
                xValue += 2;
            }

            // Create strip lines which cover the areas with filtered values
            StripLine stripLine = new StripLine();
            stripLine.BackColor = Color.FromArgb(120, 241, 185, 168);
            stripLine.IntervalOffset = 1d;
            stripLine.StripWidth = 2d;
            Chart1.ChartAreas["ChartArea1"].AxisX.StripLines.Add(stripLine);

            // Filter series data using custom filtering criteria
            Random random2 = new Random();
            double xValue2 = 2;
            for (int pointIndex = 0; pointIndex < 20; pointIndex++)
            {
                Chart1.Series["Series Output"].Points.AddXY(xValue2, random.Next(2, 47));
                xValue2 += 2;
            }
                Chart1.Series["Series Output"].IsXValueIndexed = true;
                Chart1.ChartAreas["FilteredData"].AxisX.Minimum = double.NaN;
                Chart1.ChartAreas["FilteredData"].AxisX.Maximum = double.NaN;
                Chart1.ChartAreas["FilteredData"].AxisX.LabelStyle.Interval = 2;
                Chart1.ChartAreas["FilteredData"].AxisX.MajorTickMark.Interval = 2;
                Chart1.ChartAreas["FilteredData"].AxisX.MajorGrid.Interval = 2;
            
        }
       
        
    }
}
